# ---------------------------------------------------------------------------- #
# TEST_QUERY_HELPER
# ---------------------------------------------------------------------------- #
add_executable(
    test_query_helper
    ${CMAKE_CURRENT_SOURCE_DIR}/test_query_helper.cpp
    ${CMAKE_SOURCE_DIR}/src/common/helpers/query_helper.cpp
)
target_include_directories(test_query_helper PUBLIC ${CMAKE_SOURCE_DIR}/src)
target_link_libraries(test_query_helper
    ${Boost_LIBRARIES}
)
add_test(
    NAME test_query_helper
    COMMAND test_query_helper
)

# ---------------------------------------------------------------------------- #
# TEST_TEMPLATE_HELPER
# ---------------------------------------------------------------------------- #
add_executable(
    test_template_helper
    ${CMAKE_CURRENT_SOURCE_DIR}/test_template_helper.cpp
    ${CMAKE_SOURCE_DIR}/src/common/helpers/template_helper.cpp
)
target_include_directories(test_template_helper PUBLIC ${CMAKE_SOURCE_DIR}/src)
target_link_libraries(test_template_helper
    ${Boost_LIBRARIES}
)
add_test(
    NAME test_template_helper
    COMMAND test_template_helper
)

# ---------------------------------------------------------------------------- #
# TEST_CHANGES_MANAGER
# ---------------------------------------------------------------------------- #
add_executable(test_changes_manager
    ${CMAKE_CURRENT_SOURCE_DIR}/test_changes_manager.cpp
    ${CMAKE_SOURCE_DIR}/src/datenaro/session/changes_manager.cpp
    ${COMMON_ELEMENTS_SOURCES}
    ${COMMON_CONFIG_SOURCES}
    ${COMMON_LOG_SOURCES}
    ${COMMON_MORE_SOURCES}
    ${DATENARO_SOURCES}
)
target_include_directories(test_changes_manager
    PUBLIC
    ${CMAKE_SOURCE_DIR}/src
    ${CMAKE_SOURCE_DIR}/thirdparty/sqlite_modern_cpp
)
target_link_libraries(test_changes_manager
    ${Boost_LIBRARIES}
    ${OpenSSL_LIBRARIES}
    ${SQLite3_LIBRARIES}
    ${nlohmann_json_LIBRARIES}
    ${ICU_LIBRARIES}
)
add_test(
    NAME test_changes_manager
    COMMAND test_changes_manager
)
